import java.io.*;
import java.util.List;

public class D91123 {
    public static void main(String[] args) throws IOException {
        File f = new File("D:\\main");

       File [] zuhe = f.listFiles();
        int shu = 0;
        for (int i = 0; i < zuhe.length; i++) {
            String name = zuhe[i].getName();
            FileReader fr = new FileReader(zuhe[i]);
            BufferedReader br = new BufferedReader(fr);
            String a;
            while((a = br.readLine())!=null){
                System.out.println(a);
                shu++;
                System.out.println(shu);
            }

        }
        System.out.println(shu);

    }

        }
        



